/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.qdu.util;

import com.google.gson.Gson;


/**
 * 用于解析Gson对象和java对象
 *
 * @author Lenovo
 */
public class GsonUtil {

    private static Gson gson = new Gson();
    /**
     * 将一个java对象转换为json对象
     * @param object java对象
     * @return Gson对象
     */
    public static String javaToJson(Object object) {
        return gson.toJson(object);
    }

   
}
